package com.changgou;

import entity.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * 注册中心
 *
 * @author mario
 * @version 1.0
 * @date 2020/11/12 14:24
 * @description 注意 要使用通用的mapper的组件扫描
 */
@SpringBootApplication
@EnableEurekaClient
@MapperScan(basePackages = {"com.changgou.goods.dao"})
public class GoodsApplication {
  public static void main(String[] args) {
    SpringApplication.run(GoodsApplication.class, args);
  }

  @Bean
  public IdWorker idWorker() {
    return new IdWorker(0, 1);
  }
}
